﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;
using System.Web.Mvc;

namespace eStore.Models
{

    [MetadataType(typeof(ProductReviewMetaData))]
    public partial class ProductReview
    {
        [Bind(Exclude = "CreatedDate,UserUserId")]
        private class ProductReviewMetaData
        {

            public ProductReviewMetaData()
            {

            }

            [UIHint("Please fill in the Rating.")]
            [DisplayName("Rating")]
            [DataType("Rating")]
            [Required()]
            [System.ComponentModel.DataAnnotations.Range(1, 5)]
            public int StarRate { get; set; }

            [DisplayName("Comments")]
            [Required()]
            public string ReviewComment { get; set; }

            [HiddenInput]
            [ScaffoldColumn(true)]
            public int ReviewId { get; set; }

            [HiddenInput]
            [ScaffoldColumn(false)]
            public int ProductProductId { get; set; }

            [HiddenInput]
            [ScaffoldColumn(false)]
            public int UserUserId { get; set; }

            public DateTime CreatedDate { get; set; }
        }
    }

    
    [MetadataType(typeof(OrderMetaData))]
    public partial class Order {

        public Order(){
        
        }
        private class OrderMetaData { 


            [ScaffoldColumn(false)]
            public DateTime CreatedDate{get;set;}
            
            [Required]
            [DisplayName("Shipping Address 1")]
            public string ShippingAddress1{get;set;}
            
            [Required]
            [DisplayName("Post code")]
            public int Postcode{get;set;}
        }
    }
}